﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;

namespace Library
{
    public class clsDataGridView
    {
        public static void SetDataGridView(DataGridView dgdData)
        {
            dgdData.AllowUserToAddRows = false;
            dgdData.AllowUserToDeleteRows = false;
            dgdData.MultiSelect = false;
            dgdData.AutoGenerateColumns = false;
            dgdData.AlternatingRowsDefaultCellStyle.BackColor = Color.FromArgb(224, 234, 243);
            dgdData.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            dgdData.RowsDefaultCellStyle.ForeColor = Color.DarkBlue;
            //Kich chuot vao mau thay doi theo su lua chon
            dgdData.RowsDefaultCellStyle.SelectionBackColor = Color.FromArgb(169, 183, 201);
            dgdData.RowsDefaultCellStyle.SelectionForeColor = Color.FromArgb(14, 66, 121);
            dgdData.RowsDefaultCellStyle.BackColor = Color.FromArgb(237, 242, 249);
            dgdData.RowHeadersDefaultCellStyle.SelectionBackColor = Color.LemonChiffon;
            dgdData.RowHeadersDefaultCellStyle.SelectionForeColor = Color.Blue;
            dgdData.Columns[dgdData.ColumnCount - 1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
        }
        public static void SetDataGridView2(DataGridView dgdData)
        {
            dgdData.AllowUserToAddRows = false;
            dgdData.AllowUserToDeleteRows = false;
            dgdData.MultiSelect = false;
            dgdData.AutoGenerateColumns = false;
            dgdData.AlternatingRowsDefaultCellStyle.BackColor = Color.AliceBlue;
            dgdData.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            dgdData.RowsDefaultCellStyle.ForeColor = Color.DarkBlue;
            //Kich chuot vao mau thay doi theo su lua chon
            dgdData.RowsDefaultCellStyle.SelectionBackColor = Color.FromArgb(169, 183, 201);
            dgdData.RowsDefaultCellStyle.SelectionForeColor = Color.FromArgb(14, 66, 121);
            dgdData.RowsDefaultCellStyle.BackColor = Color.AliceBlue;
            dgdData.RowHeadersDefaultCellStyle.SelectionBackColor = Color.LemonChiffon;
            dgdData.RowHeadersDefaultCellStyle.SelectionForeColor = Color.Blue;
            //dgdData.Columns[dgdData.ColumnCount - 1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
        }
        public static void SetDataGridView3(DataGridView dgdData)
        {
            dgdData.AllowUserToAddRows = false;
            dgdData.AllowUserToDeleteRows = false;
            dgdData.MultiSelect = false;
            dgdData.AutoGenerateColumns = false;
            dgdData.AlternatingRowsDefaultCellStyle.BackColor = Color.FromArgb(224, 234, 243);
            dgdData.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            dgdData.RowsDefaultCellStyle.ForeColor = Color.DarkBlue;
            //Kich chuot vao mau thay doi theo su lua chon
            dgdData.RowsDefaultCellStyle.SelectionBackColor = Color.FromArgb(169, 183, 201);
            dgdData.RowsDefaultCellStyle.SelectionForeColor = Color.FromArgb(14, 66, 121);
            dgdData.RowsDefaultCellStyle.BackColor = Color.FromArgb(237, 242, 249);
            dgdData.RowHeadersDefaultCellStyle.SelectionBackColor = Color.LemonChiffon;
            dgdData.RowHeadersDefaultCellStyle.SelectionForeColor = Color.Blue;
        }
    }
}
